<html>
	<head>
		<meta charset="utf-8"/>
		<title>BObject</title>
		<link rel="stylesheet" type="text/css" href="../style.css"/>
	</head>
	<body>
		<h1>BObject</h1>
		<p>Inherites from <a href="BThing.html">BThing</a></p>
		<h2>public</h2>
		<table id="public">
			<tr><td align="right"/><td><a href="#BObject()">BObject</a>();</td></tr>
			<tr><td align="right"/><td><a href="#BObject(const BString&)">BObject</a>(const BString& name);</td></tr>
			<tr><td align="right"/><td><a href="#~BObject()">~BObject</a>();</td></tr>
			<tr><td align="right">bool </td><td><a href="#setName(const BString&)">setName</a>(const BString& name);</td></tr>
			<tr><td align="right">const BString& </td><td><a href="#name()">name</a>() const;</td></tr>
			<tr><td align="right">bool </td><td><a href="#setAsset(const BValue&)">setAsset</a>(const BValue& asset);</td></tr>
			<tr><td align="right">const BValue& </td><td><a href="#asset()">asset</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#setAble(bool)">setAble</a>(bool able);</td></tr>
			<tr><td align="right">bool </td><td><a href="#able()">able</a>() const;</td></tr>
			<tr><td align="right">void </td><td><a href="#enable()">enable</a>();</td></tr>
			<tr><td align="right">void </td><td><a href="#disable()">disable</a>();</td></tr>
			<tr><td align="right">bool </td><td><a href="#lock()">lock</a>();</td></tr>
			<tr><td align="right">bool </td><td><a href="#unlock()">unlock</a>();</td></tr>
			<tr><td align="right">bool </td><td><a href="#trylock()">trylock</a>();</td></tr>
			<tr><td align="right">bool </td><td><a href="#connect(int, METHOD)">connect</a>(int signal, METHOD method);</td></tr>
			<tr><td align="right">bool </td><td><a href="#connect(BObject*, int, METHOD)">connect</a>(BObject* object, int signal, METHOD method);</td></tr>
			<tr><td align="right">bool </td><td><a href="#connect(const BString&, METHOD)">connect</a>(const BString& signal, METHOD method);</td></tr>
			<tr><td align="right">bool </td><td><a href="#connect(BObject*, const BString&, METHOD)">connect</a>(BObject* object, const BString& signal, METHOD method);</td></tr>
			<tr><td align="right">bool </td><td><a href="#disconnect(int)">disconnect</a>(int signal = 0);</td></tr>
			<tr><td align="right">bool </td><td><a href="#disconnect(BObject*,int)">disconnect</a>(BObject* object, int signal = 0);</td></tr>
			<tr><td align="right">bool </td><td><a href="#disconnect(const BString&)">disconnect</a>(const BString& signal);</td></tr>
			<tr><td align="right">bool </td><td><a href="#disconnect(BObject*, const BString&)">disconnect</a>(BObject* object, const BString& signal);</td></tr>
			<tr><td align="right">bool </td><td><a href="#emit(int,const BValue&)">emit</a>(int signal, const BValue& value = BValue());</td></tr>
			<tr><td align="right">bool </td><td><a href="#emit(const BString&,const BValue&)">emit</a>(const BString& signal, const BValue& value = BValue());</td></tr>
			<tr><td align="right">bool </td><td><a href="#post(BObject*, int,const BValue&)">post</a>(BObject* object, int signal, const BValue& value = BValue());</td></tr>
			<tr><td align="right">bool </td><td><a href="#post(BObject*, const BString&,const BValue&)">post</a>(BObject* object, const BString& signal, const BValue& value = BValue());</td></tr>
		</table>
		<h2>protected</h2>
		<table id="protected"/>
		<div id="desc">
			<h2>Detailed Description : </h2>
			<p>The BObject class is the base class of all objects.</p>
			<p>BObject is the heart of the Object Model.The central feature in this model is a mechanism for real-time object communication called signals and slots.You can connect a signal to a slot with connect() and destroy the connection with disconnect().To avoid never ending notification loops you can temporarily block signals with setBlocked().</p>
			<p>Object has name which is useful.When you use muti-thread object can be locked mutex.</p>
			<p>Object has an asset which is user data.
			<p>When an object is deleted, it emits a Signal_Destroyed. You can catch this signal to manage objects.</p><p>The BOBJECT macro is dispensable for you.It supply method className and a member data-ptr.</p>
			<h3>Signals and Slots:</h3>
			<p/>
			<p>Signal is a integer or a string eg Signal_Able,"my-signal".Slot is a member function of object,it has two or less parameters,first param BObject* is the object which emit the signal, second param (const BValue&) is value emited with signal.</p>
			<p>  Params of slot are definite two but you can change the type, eg slot(const BObject*, BValue& value). Sometimes slot function will change the value for result which is cared by signal emiter object.</p>
		</div>
		<h2 id="docs">Member Function Documentation</h2>
		<div id="BObject()">
			<h3>BObject();</h3>
			<p>Constructs object with nothing.</p>
		</div>
		<div id="BObject(const BString&)">
			<h3>BObject(const BString& name);</h3>
			<p>Constructs object with name.</p>
			<p>See also : <a href="#setName(const BString&)">setName</a></p>
		</div>
		<div id="~BObject()">
			<h3>~BObject();</h3>
			<p>Destroy object.</p>
		</div>
		<div id="setName(const BString&)">
			<h3>bool setName(const BString& name);</h3>
			<p>Set name of object, if name is chaned object will emit Signal_Rename with name.</p>
		</div>
		<div id="name()">
			<h3>const BString& name() const;</h3>
			<p>Return object name.</p>
		</div>
		<div id="setAsset(const BValue&)">
			<h3>bool setAsset(const BValue& asset);</h3>
			<p>Set asset of object, if asset is chaned object will emit Signal_AssetChanged with name.</p>
		</div>
		<div id="name()">
			<h3>const BValue& asset() const;</h3>
			<p>Return object asset.</p>
		</div>
		<div id="setAble(bool)">
			<h3>void setAble(bool able);</h3>
			<p>Set able of object, if able changed object will emit Signal_Enable or Signal_Disable.</p>
			<p>See also : <a href="#enable()">enable()</a><a href="#disable()">disable()</a></p>
		</div>
		<div id="able()">
			<h3>bool able() const;</h3>
		</div>
		<div id="enable()">
			<h3>void enable();</h3>
			<p>Equals setAble(true).</p>
		</div>
		<div id="disable()">
			<h3>void disable();</h3>
			<p>Equals setAble(false).</p>
		</div>
		<div id="lock()">
			<h3>bool lock();</h3>
			<p>Lock object's mutex, watting till lock successful or failed.</p>
		</div>
		<div id="unlock()">
			<h3>bool unlock();</h3>
			<p>Unlock object's mutex, block thread till unlock successful or failed.</p>
		</div>
		<div id="trylock()">
			<h3>bool trylock();</h3>
			<p>
				 Try lock mutex, but don't block, return sucessful or failed immediately. </p>
		</div>
		<div id="connect(int, METHOD)">
			<h3>bool connect(int signal, METHOD method);</h3>
			<p>Connect global signal to special method. Don't care who emit the signal.</p>
		</div>
		<div id="connect(BObject*, int, METHOD)">
			<h3>bool connect(BObject* object, int signal, METHOD method);</h3>
			<p>Connect signal emited by object to special method.</p>
		</div>
		<div id="connect(const BString&, METHOD)">
			<h3>bool connect(const BString& signal, METHOD method);</h3>
			<p>Connect global string signal to special method, Don't care who emit the signal.</p>
		</div>
		<div id="connect(BObject*, const BString&, METHOD)">
			<h3>bool connect(BObject* object, const BString& signal, METHOD method);</h3>
			<p>Connect string signal emited by object to special method.</p>
		</div>
		<div id="disconnect(int)">
			<h3>bool disconnect(int signal = 0);</h3>
			<p>Disconnect signal. If signal is 0 means every signals. This is dangerous because connections needed by Inherits class will be removed too.</p>
		</div>
		<div id="disconnect(BObject*,int)">
			<h3>bool disconnect(BObject* object, int signal = 0);</h3>
			<p>Disconnect signal emited by object, if signal is 0 means every signals.</p>
		</div>
		<div id="disconnect(const BString&)">
			<h3>bool disconnect(const BString& signal);</h3>
			<p>Disconnect string signal, if signal is empty means every string signals. This is dangerous because connections needed by Inherits class will be removed too.</p>
		</div>
		<div id="disconnect(BObject*, const BString&)">
			<h3>bool disconnect(BObject* object, const BString& signal);</h3>
			<p>Disconnect string signal emited by object, if object is none return false. if signal string is empty means every string signals emited by object will be removed.</p>
		</div>
		<div id="emit(int,const BValue&)">
			<h3>bool emit(int signal, const BValue& value = BValue());</h3>
			<p>Object emits integer signal with value. If signal is zero or object is disabled return false.</p>
		</div>
		<div id="emit(const BString&,const BValue&)">
			<h3>bool emit(const BString& signal, const BValue& value = BValue());</h3>
			<p>Object emits string signal with value. If signal is empty or object is disabled return false.</p>
		</div>
		<div id="post(BObject*, int,const BValue&)">
			<h3>bool post(BObject* object, int signal, const BValue& value = BValue());</h3>
			<p>Post the integer signal to object directly, other object connect to this signal won't receive this signal even global connectors.</p>
		</div>
		<div id="post(BObject*, const BString&,const BValue&)">
			<h3>bool post(BObject* object, const BString& signal, const BValue& value = BValue());</h3>
			<p>Post the string signal to object directly, other connector to this signal won't receive this signal even global connectors.</p>
		</div>
	</body>
</html>